import React from 'react';
import './index.less';
import { Image } from 'antd';

const WithdrawalInfoBox = ({ title, list }) => {
  return (
    <div className='handle_info'>
      <div className='handle_info_title'>
        {title}
      </div>
      {
        list && list.map((item, index) => {
          return (
            <div className='handle_info_item' key={item.name}>
              <div className='handle_info_item_name'>{item.name} :</div>
              {
                item.status === 'success' && <Image src={item.value} width={70} height={70} />
              }

              {
                item.status === 'error' && <div className='handle_info_item_value_error'>错误</div>
              }

              {
                !item.status && <div
                  className='handle_info_item_value'
                  style={{ color: item.color }}>
                  {item.value}
                </div>
              }
            </div>
          );
        })
      }

    </div>
  );
};
export default WithdrawalInfoBox;